<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<form id="pagerForm" action="<%=basePath%>findClinentCustomers"  method="post">
	<input type="hidden" name="pageNum" value="${pageNum}" />
	<input type="hidden" name="numPerPage" value="${numPerPage}" />
	<input type="hidden" name="orderField" value="desc" />
	<input type="hidden" name="airMailPriceKindId" value="<s:property value="airMailPriceKindId"/>"/>
	<input type="hidden" name="customerCondition" value="<s:property value="customerCondition"/>"/>
</form>
<script>
	/**
	 * 选择绑定
	 */
	function selectToBang(){
		var a = $("input[name=customerIds]");
		var cusid = "";
		$.each(a,function(i){
			if(this.checked){
				if(i==0){
					cusid += ""+this.value;
				}else{
					cusid +=","+this.value;
				}
			}			
		});
		//alert(cusid.length);
		if(cusid.length==0){
		}else{
			var bp = '<%=basePath%>bangAirMailKind?customerIds='+cusid+'&airMailPriceKindId='+'<s:property value="airMailPriceKindId"/>';
			$("#batchUpdate").attr("href",bp);
		}
		//alert(cusid);
		//bangAirMailKind
	}
</script>
<div class="pageHeader">
	<div class="searchBar">
		<form action="<%=basePath%>findClinentCustomers?pageNum=1&numPerPage=20" method="post" onsubmit="return navTabSearch(this)">
			<input type="hidden" name="airMailPriceKindId" value="<s:property value="airMailPriceKindId"/>"/>
			<table>
				<tr><td>客户查询：<input name="customerCondition"/></td><td><input type="submit" value="查询"/></td><td>所属分类：</td><td>${airMailPriceKindName}</td></tr>
			</table>
		</form>
	</div>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li>
				<a class="edit" id="batchUpdate" posttype="string"  href="<%=basePath%>bangAirMailKind?airMailPriceKindId=<s:property value="airMailPriceKindId"/>"
				title="确定要绑定吗?" posttype="string" target="selectedTodo"
			    rel="customerIds" ><span>绑定</span></a>
			</li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="108">
		<thead>
		 <tr>
			<td><input type="checkbox"  group="customerIds"  class="checkboxCtrl" />全选</td>
			<td><s:property value="airMailPriceKindId"/></td>
			<td></td>
			<td></td>
		 </tr>
		</thead>
		<tbody id="">
			<s:iterator value="customersList" var="o">
				<tr>
					<td><input type="checkbox" name="customerIds" value="<s:property value="#o.orderCustomerNumber"/>" /></td>
					<td><s:property value="#o.orderCustomerNumber"/></td>
					<td><s:property value="#o.customersId"/></td>
					<td><s:property value="#o.customersName"/></td>
				</tr>
			</s:iterator>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>共${totalCount}条</span>
		</div>
		<div class="pagination" targetType="navTab" totalCount="${totalCount}" numPerPage="${numPerPage}" pageNumShown="10" currentPage="${pageNum}"></div>
	</div>	
</div>
